import request from '/@/utils/request';

/**
 * 
 * 银行卡列表
**/
export function apiBankCardList(query:Object) {
    return request({
        url: '/api/v1/ucenter/user/banks/list',
        method: 'get',
        params:query
    })
}
/**
 * 
 * 删除用户银行卡
**/
export function apideleteBankCardList(id:Object) {
    return request({
        url: '/app/v1/ucenter/user/banks',
        method: 'delete',
        data:{id:[id]}
    })
}
/**
 * 
 * 添加用户银行卡
**/
export function apiaddBankCardList(data:object) {
    return request({
        url: '/app/v1/ucenter/user/banks',
        method: 'post',
        data:data
    })
}
export function apiMemberList(query:Object) {
    return request({
        url: '/api/v1/ucenter/user/list',
        method: 'get',
        params:query
    })
}

export function getRoleParams() {
    return request({
        url: '/api/v1/system/role/getParams',
        method: 'get'
    })
}
export function getRoleList() {
    return request({
        url: '/api/v1/system/role/getParams',
        method: 'get'
    })
}
export function apiMemberListaddRole(data:object) {
    return request({
        url: '/api/v1/ucenter/user',
        method: 'post',
        data:data
    })
}

export function getRole(id:number) {
    return request({
        url: '/api/v1/system/role/get',
        method: 'get',
        params:{id}
    })
}


export function editRole(data:object) {
    return request({
        url: '/api/v1/system/role/edit',
        method: 'put',
        data:data
    })
}


export function deleteRole(id:number) {
    return request({
        url: '/api/v1/system/role/delete',
        method: 'delete',
        data:{ids:[id]}
    })
}

export function dataScope(data:any) {
    return request({
        url: '/api/v1/system/role/dataScope',
        method: 'put',
        data:data
    })
}


// 根据角色ID查询部门树结构
export function roleDeptTreeSelect(roleId:number) {
    return request({
        url: '/api/v1/system/role/deptTreeSelect',
        method: 'get',
        params:{roleId}
    })
}


